
#include "S_29_ProductConfig_doGet.h"
#include "mi_iid_define.h"
#include "property_decoder.h"
#include "section_define.h"
#include "main.h"


extern uint8_t  g_uNo2RegList[PBS_NO2REGSIZE];


/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 最小值: 0, 最大值: 65535, 步长: 1
 */
static void P_29_1_FunctionSelect_doGet(property_operation_t *o)
{
#if 	PROPERTY_TYPE
	property_value_new_integer(&o->value,((g_uNo2RegList[0x10B-0x100]<<8)|g_uNo2RegList[0x10A-0x100]));
#else	
	o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 8888;  // TODO: 这里需要读到属性真正的值
#endif
    
}

void S_29_ProductConfig_doGet(property_operation_t *o)
{
    switch (o->piid)
    {
        case PIID_29_1_FunctionSelect:
            P_29_1_FunctionSelect_doGet(o);
            break;

        default:
            o->code = OPERATION_ERROR_VALUE;
            break;
    }
}
